<template>
  <div class="goods">
    <PageCountent
      :contentTableConfig="contentTableConfig"
      pageName="story"
      @newBtnClick="handleNewData"
    >
    </PageCountent>
    <pageModal
      ref="pageModalRef"
      pageName="story"
      :modal-config="modalConfig"
      :defaultInfo="defaultInfo"
    />
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import PageCountent from '@/components/page-content'
import pageModal from '@/components/page-modal'

import { contentTableConfig } from './config/content.config'
import { modalConfig } from './config/modal.config'

import { usePageModal } from '@/hooks/userPageModal'

export default defineComponent({
  name: 'story',
  components: { PageCountent, pageModal },
  setup() {
    const [pageModalRef, defaultInfo, handleNewData] = usePageModal()

    return { contentTableConfig, modalConfig, handleNewData, pageModalRef, defaultInfo }
  }
})
</script>

<style scoped></style>
